package com.jy.app.lib.base;

import android.content.Context;

import com.jy.app.lib.application.BaseApplication;

/**
 * App参数保存
 * Created by jan on 2016/6/20.
 */
public class ParametersConfig extends BaseConfig {
    private static final String CONFIG_NAME = "Parameters";
    private static ParametersConfig mInstance = null;

    public static ParametersConfig getInstance(){
        if(mInstance==null){
            mInstance = new ParametersConfig(BaseApplication.appContext);
        }
        return mInstance;
    }

    private ParametersConfig(Context context){
        this(context,CONFIG_NAME);
    }

    public ParametersConfig(Context context, String sharedPreferencesName) {
        super(context, sharedPreferencesName);
    }

    @Override
    public void setBoolean(String name, boolean bValue) {
        super.setBoolean(name, bValue);
    }

    @Override
    public boolean getBoolean(String name, boolean defaultBool) {
        return super.getBoolean(name, defaultBool);
    }

    @Override
    public void setString(String name, String strValue) {
        super.setString(name, strValue);
    }

    @Override
    public String getString(String name, String defaultVal) {
        return super.getString(name, defaultVal);
    }

    @Override
    public void setInt(String name, int intValue) {
        super.setInt(name, intValue);
    }

    @Override
    public int getInt(String name, int defaultVal) {
        return super.getInt(name, defaultVal);
    }

    @Override
    public void setLong(String name, long longValue) {
        super.setLong(name, longValue);
    }

    @Override
    public long getLong(String name, long defaultVal) {
        return super.getLong(name, defaultVal);
    }
}
